C (118/301)

From:Allan Odgaard
Date:02 Aug 99 at 22:44:37
Subject:Re: Drawing images on Intution

On 01-Aug-99, Darryl Hartwig wrote:

>> How is your background generated?
> The background is simply a green colour, then a whole bunch
> of cards are splashed over it. I'm basically moving a card
> from one column to another.

Then you can probably redraw a small portion of the background fast, and so I'd
not make a copy, but simply ask your code to redraw the damaged areas which
arise while dragging a card.

> But how is the copy to be achieved? ClipBlit() only works
> from one rastpart to another.

You'd allocate a bitmap (friend of your window bitmap) and encapsulate it in a
rastport you setup yourself (InitRastPort()). Then you can move back and forth
from the on and off screen bitmaps.

> I've tried using ObtainPen() and setting up the actual
> colours... this worked, at least for a while (that is, got
> the whole 8 colours I wanted initially, then dropped all
> the way to 1).

Dropped to 1? What does that mean?

> But how is the remapping to be done?

I think you're better of using datatypes - but let me know if you want the full
explanation.

> It does sound like using DataTypes is the easiest way to go.
> Do you have some sample code, please?

One is attached. It locks a screen, loads an image and remaps it to that
screen, then it opens a window and blit the image to that window. (tab = 3)

Regards Allan



URL: http://www.DIKU.dk/students/duff/


It is better to have tried and failed than to have failed to try, but the
result's the same.
-- Mike Dennison

@{fg shine}There should be a file clipboard.text included with this guide.@{fg text}